<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class Teacher extends Model
{
    use HasFactory;
    protected $table = 'teachers';
    public $timestamps = false;

    public static $genders = [
        1 => '男',
        2 => '女',
    ];

    public static function pluckInfo()
    {
        return self::all()->pluck('name', 'id');
    }

    public function qualifications()
    {
        return $this->hasMany(TeacherQualification::class, 'teacher_id', 'id');
    }

}
